import type { PlasmoMessaging } from "@plasmohq/messaging"
import { Storage } from "@plasmohq/storage"

const storage = new Storage()

/**
 * logoutService-登出服务
 * @param req
 * @param res
 */
const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
  await storage.set("loginInfo", {})
  await storage.set("isLogin", false)
  await storage.set("loginErr", "")
}

export default handler
